home *** CD-ROM | disk | FTP | other *** search
- Path: axe.humboldt.edu!etb1
- From: etb1@Axe.Humboldt.edu (Eric Brower)
- Newsgroups: comp.lang.c
- Subject: [Q] Best handling of non-fixed-length data??
- Date: 18 Apr 1996 18:39:43 GMT
- Organization: Information Resources and Technology
- Message-ID: <4l629f$4cc@nuke.csu.net>
- NNTP-Posting-Host: axe.humboldt.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi there, and thanks in advance for taking the time.
- I consider myself an adept, however novice, programmer in C;
- but I need advice on the best way to manage non-fixed-length data.
-
- Here is my application: I would like to store exam questions, along with
- the correct answer and as many other possible answers per question, in a
- file. From this file, I would like to be able to extract the question
- and all possible answers through the question number I assign each question
- within the database. My problem lies in memory management, as well as
- method of storing this data. You see, I'd like questions to be as long
- as need be, without using hideous amounts of space for the short questions
- as well. As well, some questions may have only two possible answers, while
- other may have five or more. I also must be able to extract the correct
- answer from among the possibles.
-
- I had thought of using a structure, but I am not sure of how to vary the
- amount of entries, array sizes, etc.
-
- ALLOW ME TO CLARIFY-- I am in no way asking anyone to do my work/programming
- for me; I quite enjoy figuring these things out myself, but I need a bit of
- experienced advice in this arena.
-
- Thanks in advance; e-mail is preferred (I will summarize).
- Eric
-
-
-
-
-